{{>licenseInfo}}

package {{packagename}};

import static com.google.common.base.Preconditions.checkArgument;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.google.common.base.Strings;
import com.google.common.collect.Maps;

import {{importpackagename}}.*;
import com.huawei.openstack4j.model.common.ActionResponse;
import com.huawei.openstack4j.openstack.compute.functions.ToActionResponseFunction;

/**
 * {{apiImplClassName}}
 */
public class {{apiImplClassName}} extends {{apiBaseClassName}} {
    {{#alloperations}}
    {{#operations}}
    {{#operation}}
    {{#vendorExtensions.x-notrequired}}

    /**
     * {{#summary}}{{.}}{{/summary}}{{^summary}}{{vendorExtensions.x-nickname}}{{/summary}}
     */
    {{#isDeprecated}}
    @Deprecated
    {{/isDeprecated}}
    public {{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}} {{/returnType}}{{^returnType}}ActionResponse {{/returnType}}{{{vendorExtensions.x-nickname}}}() {

        {{#vendorExtensions.x-is-get-method}}
        {{#vendorExtensions.isExtractInfo}}
        return get({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return get({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-get-method}}
        {{#vendorExtensions.x-is-post-method}}
        {{#vendorExtensions.isExtractInfo}}
        return post({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return post({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-post-method}}
        {{#vendorExtensions.x-is-put-method}}
        {{#vendorExtensions.isExtractInfo}}
        return put({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return put({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-put-method}}
    }
    {{/vendorExtensions.x-notrequired}}

    /**
     * {{#summary}}{{.}}{{/summary}}{{^summary}}{{vendorExtensions.x-nickname}}{{/summary}}
     */
    {{#isDeprecated}}
    @Deprecated
    {{/isDeprecated}}
    {{^vendorExtensions.x-is-delete-method}}
    {{#vendorExtensions.x-filteroption}}
    public {{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}} {{/returnType}}{{^returnType}}ActionResponse {{/returnType}}{{{vendorExtensions.x-nickname}}}({{#hasPathParams}}{{#pathParams}}{{^vendorExtensions.x-isProject}}{{{dataType}}} {{{paramName}}}{{#hasMore}}, {{/hasMore}}{{^hasMore}}{{#hasQueryParams}}, {{/hasQueryParams}}{{^hasQueryParams}}{{#hasBodyParam}}, {{/hasBodyParam}}{{/hasQueryParams}}{{/hasMore}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{/hasPathParams}}{{#hasQueryParams}}{{{vendorExtensions.x-filteroption}}} option{{#hasBodyParam}}, {{/hasBodyParam}}{{/hasQueryParams}}{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}} {{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}) {
        {{#hasPathParams}}
        {{#pathParams}}
        {{^vendorExtensions.x-isProject}}
        {{#required}}
        {{#isString}}
        checkArgument(!Strings.isNullOrEmpty({{{paramName}}}), "parameter `{{{paramName}}}` should not be empty");
        {{/isString}}
        {{^isString}}
        checkArgument(null != {{{paramName}}}, "parameter `{{{paramName}}}` should not be null");
        {{/isString}}
        {{/required}}
        {{/vendorExtensions.x-isProject}}
        {{/pathParams}}
        {{/hasPathParams}}
        {{#hasBodyParam}}
{{#vendorExtensions.x-request-validate}}
{{{vendorExtensions.x-request-validate}}}
{{/vendorExtensions.x-request-validate}}
        {{/hasBodyParam}}
        {{#hasQueryParams}}
        checkArgument(null != option, "parameter `option` should not be null");
        Map<String, Object> parameters = option.getOptions();
        {{#queryParams}}
        {{#required}}
        {{#isString}}
        checkArgument(!Strings.isNullOrEmpty(parameters.get("{{{paramName}}}").toString()), "parameter `{{{paramName}}}` should not be empty");
        {{/isString}}
        {{^isString}}
        checkArgument(null != parameters.get("{{{paramName}}}"), "parameter `{{{paramName}}}` should not be null");
        {{/isString}}
        {{/required}}
        {{/queryParams}}
        {{/hasQueryParams}}

        {{#hasQueryParams}}
        {{#vendorExtensions.x-is-get-method}}
        {{#vendorExtensions.isExtractInfo}}
        return get({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).params(parameters).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return get({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).params(parameters).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-get-method}}
        {{/hasQueryParams}}
        {{^hasQueryParams}}
        {{#vendorExtensions.x-is-get-method}}
        {{#vendorExtensions.isExtractInfo}}
        return get({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return get({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-get-method}}
        {{/hasQueryParams}}
        {{#vendorExtensions.x-is-post-method}}
        {{#vendorExtensions.isExtractInfo}}
        return post({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).entity({{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return post({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).entity({{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-post-method}}
        {{#vendorExtensions.x-is-put-method}}
        {{#vendorExtensions.isExtractInfo}}
        return put({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).entity({{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return put({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).entity({{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-put-method}}
    }
    {{/vendorExtensions.x-filteroption}}
    {{^vendorExtensions.x-filteroption}}
    public {{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}} {{/returnType}}{{^returnType}}ActionResponse {{/returnType}}{{{vendorExtensions.x-nickname}}}({{#hasPathParams}}{{#pathParams}}{{^vendorExtensions.x-isProject}}{{{dataType}}} {{{paramName}}}{{#hasMore}}, {{/hasMore}}{{^hasMore}}{{#hasQueryParams}}, {{/hasQueryParams}}{{^hasQueryParams}}{{#hasBodyParam}}, {{/hasBodyParam}}{{/hasQueryParams}}{{/hasMore}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{/hasPathParams}}{{#hasQueryParams}}{{#queryParams}}{{{dataType}}} {{{paramName}}}{{#hasMore}}, {{/hasMore}}{{^hasMore}}{{#hasBodyParam}}, {{/hasBodyParam}}{{/hasMore}}{{/queryParams}}{{/hasQueryParams}}{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}} {{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}) {
        {{#hasPathParams}}
        {{#pathParams}}
        {{^vendorExtensions.x-isProject}}
        {{#required}}
        {{#isString}}
        checkArgument(!Strings.isNullOrEmpty({{{paramName}}}), "parameter `{{{paramName}}}` should not be empty");
        {{/isString}}
        {{^isString}}
        checkArgument(null != {{{paramName}}}, "parameter `{{{paramName}}}` should not be null");
        {{/isString}}
        {{/required}}
        {{/vendorExtensions.x-isProject}}
        {{/pathParams}}
        {{/hasPathParams}}
        {{#hasQueryParams}}
        {{#queryParams}}
        {{#required}}
        {{#isString}}
        checkArgument(!Strings.isNullOrEmpty({{{paramName}}}), "parameter `{{{paramName}}}` should not be empty");
        {{/isString}}
        {{^isString}}
        checkArgument(null != {{{paramName}}}, "parameter `{{{paramName}}}` should not be null");
        {{/isString}}
        {{/required}}
        {{/queryParams}}
        {{/hasQueryParams}}
        {{#hasBodyParam}}
{{#vendorExtensions.x-request-validate}}
{{{vendorExtensions.x-request-validate}}}
{{/vendorExtensions.x-request-validate}}
        {{/hasBodyParam}}

        {{#hasQueryParams}}
        HashMap<String, Object> parameters = Maps.newHashMap();
        {{#queryParams}}
        parameters.put("{{{paramName}}}", {{{paramName}}});
        {{/queryParams}}

        {{#vendorExtensions.x-is-get-method}}
        {{#vendorExtensions.isExtractInfo}}
        return get({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).params(parameters).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return get({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).params(parameters).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-get-method}}
        {{/hasQueryParams}}
        {{^hasQueryParams}}
        {{#vendorExtensions.x-is-get-method}}
        {{#vendorExtensions.isExtractInfo}}
        return get({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return get({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-get-method}}
        {{/hasQueryParams}}
        {{#vendorExtensions.x-is-post-method}}
        {{#vendorExtensions.isExtractInfo}}
        return post({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).entity({{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return post({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).entity({{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-post-method}}
        {{#vendorExtensions.x-is-put-method}}
        {{#vendorExtensions.isExtractInfo}}
        return put({{#returnBaseType}}{{{returnBaseType}}}.{{{returnBaseType}}}s{{/returnBaseType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).entity({{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}).execute().getList();
        {{/vendorExtensions.isExtractInfo}}
        {{^vendorExtensions.isExtractInfo}}
        return put({{#returnType}}{{#vendorExtensions.x-classname}}{{{vendorExtensions.x-classname}}}{{/vendorExtensions.x-classname}}{{^vendorExtensions.x-classname}}{{{returnType}}}{{/vendorExtensions.x-classname}}{{/returnType}}{{^returnType}}ActionResponse{{/returnType}}.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}}).entity({{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}).execute();
        {{/vendorExtensions.isExtractInfo}}
        {{/vendorExtensions.x-is-put-method}}
    }
    {{/vendorExtensions.x-filteroption}}
    {{/vendorExtensions.x-is-delete-method}}
    {{#vendorExtensions.x-is-delete-method}}
    public ActionResponse {{{vendorExtensions.x-nickname}}}({{#hasPathParams}}{{#pathParams}}{{^vendorExtensions.x-isProject}}{{{dataType}}} {{{paramName}}}{{#hasMore}}, {{/hasMore}}{{^hasMore}}{{#hasQueryParams}}, {{/hasQueryParams}}{{^hasQueryParams}}{{#hasBodyParam}}, {{/hasBodyParam}}{{/hasQueryParams}}{{/hasMore}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{/hasPathParams}}{{#hasQueryParams}}{{#queryParams}}{{{dataType}}} {{{paramName}}}{{#hasMore}}, {{/hasMore}}{{^hasMore}}{{#hasBodyParam}}, {{/hasBodyParam}}{{/hasMore}}{{/queryParams}}{{/hasQueryParams}}{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}} {{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}) {
        {{#hasPathParams}}
        {{#pathParams}}
        {{^vendorExtensions.x-isProject}}
        {{#required}}
        {{#isString}}
        checkArgument(!Strings.isNullOrEmpty({{{paramName}}}), "parameter `{{{paramName}}}` should not be empty");
        {{/isString}}
        {{^isString}}
        checkArgument(null != {{{paramName}}}, "parameter `{{{paramName}}}` should not be null");
        {{/isString}}
        {{/required}}
        {{/vendorExtensions.x-isProject}}
        {{/pathParams}}
        {{/hasPathParams}}
        {{#hasQueryParams}}
        {{#queryParams}}
        {{#required}}
        {{#isString}}
        checkArgument(!Strings.isNullOrEmpty({{{paramName}}}), "parameter `{{{paramName}}}` should not be empty");
        {{/isString}}
        {{^isString}}
        checkArgument(null != {{{paramName}}}, "parameter `{{{paramName}}}` should not be null");
        {{/isString}}
        {{/required}}
        {{/queryParams}}
        {{/hasQueryParams}}
        {{#hasBodyParam}}
{{#vendorExtensions.x-request-validate}}
{{{vendorExtensions.x-request-validate}}}
{{/vendorExtensions.x-request-validate}}
        {{/hasBodyParam}}

        return ToActionResponseFunction.INSTANCE
                .apply(delete(Void.class, {{#vendorExtensions.x-resourcePath}}"/{{{vendorExtensions.x-resourcePath}}}"{{/vendorExtensions.x-resourcePath}}{{#pathParams}}{{^vendorExtensions.x-isProject}} + "/" + {{{paramName}}}{{/vendorExtensions.x-isProject}}{{/pathParams}}{{#vendorExtensions.x-originPath}} + "/{{{vendorExtensions.x-originPath}}}"{{/vendorExtensions.x-originPath}})
                        .executeWithResponse());
    }
    {{/vendorExtensions.x-is-delete-method}}
    {{/operation}}
    {{/operations}}
    {{/alloperations}}
}
